{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "对于投骰子来说，结果是1到6。得到任何一个结果的概率是相等的，这就是均匀分布的基础。与伯努利分布不同，均匀分布的所有可能结果的n个数也是相等的。\n",
    "\n",
    "如果变量X是均匀分布的，则密度函数可以表示为：\n",
    "\n",
    "<img src=\"1.png\" style=\"width:400px;height:300px;float:left\"> "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA20AAAHVCAYAAABi9BP7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3X2M7ml5H/bvtTNngWVfHHU3arW7ZLGypNk4brCOKYmVxgkkWtxoqdQkAonWjS2vmgbnzW6L45akVKpaqOq4Cq27tWmU2DXFxE1W6TokTdxWrQLl4BdiILQrErMnuOI4Zs9ZYGfO88zc/WPmkOEw58zbM+f33L/785GQ5uXHOdc+LDPzneu6r7taawEAAGA93TV1AQAAANya0AYAALDGhDYAAIA1JrQBAACsMaENAABgjQltAAAAa0xoAwAAWGNCGwAAwBoT2gAAANbY5lR/8YMPPtgee+yxqf56AACASX3iE5/49dbaQ0c9N1loe+yxx3Lp0qWp/noAAIBJVdWvHuc545EAAABrTGgDAABYY0IbAADAGhPaAAAA1pjQBgAAsMaENgAAgDUmtAEAAKwxoQ0AAGCNCW0AAABrTGgDAABYY0IbAADAGhPaAAAA1pjQBgAAsMaENgAAgDV2ZGirqg9U1Rer6ldu8fmqqv+6qp6vqk9W1betvkwAAIAxHafT9leSPHmbz78lyeP7/3k6yX979rIAAABIks2jHmit/R9V9dhtHnlrkr/aWmtJPlpV31RV/1Jr7ddWVCMAnLuvXl9msdOmLuMbVCX3v/LC1GUAMK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/iSQ/ux/S/u+q2k3yYPZ+Q8UZ3eq1r6rfmb0vZr9cVcneeN4vVNUbWmv/3x0scbZu9+99klTVdyf5w0ne5JcU5+5ykkcPvP9IOhyV6VVVXcheYPup1trPTl3PQL4jyVNV9V1JXpnk/qr6ydbaOyauawSXk1xurd3oKn84e6GNO+PNSf5xa+1KklTVzyb5PUm6Cm3GIw/3hSS/b//tP5Dk/52wltH8jey95qmq1yW5O8mvT1rRAFpr/7C19ptba4+11h7L3jeYbxPY7oyqejLJf5jkqdbaV6euZwAfT/J4Vb22qu7O3oH0ZyeuaQi191uhn0jymdbafzV1PSNprf1Qa+2R/a/xb0vy9wW2O2P/e+kLVfXb9j/0piSfnrCk0Xw+yRur6p79r0FvSoeLYIbttB3h+5L86P5hxa0kT09cz0g+kOQDVfUrSa4n+W5dBwbwl5O8Isnf3e90frS19u9OW9J8tdaWVfXOJB/J3haxD7TWPjVxWaP4jiT/VpJ/WFW/tP+xP99ae27CmuBO+P4kP7X/i6LPJfnjE9czjP2R1A8n+YXsHUH4xSTPTFvVyZWfhwEAANaX8UgAAIA1JrQBAACsMaENAABgjQltAAAAa0xoAwAAWGNCGwAAwBoT2gAAANbY/w/zWPVUDOaKxwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 1080x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import scipy.stats as stats\n",
    "import matplotlib.pyplot as plt\n",
    "plt.figure(figsize=(15,8))\n",
    "datas = np.linspace(-8, 8, 100)\n",
    "# PDF loc=0, scale=1\n",
    "plt.plot(datas, stats.uniform.pdf(datas,loc=0, scale=1))\n",
    "plt.fill_between(datas,stats.uniform.pdf(datas,loc=0, scale=1))\n",
    "# PDF loc=-3, scale=3\n",
    "plt.plot(datas, stats.uniform.pdf(datas, loc=-3, scale=3))\n",
    "plt.fill_between(datas,stats.uniform.pdf(datas,loc=-3, scale=3))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
